﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lilium.Web.Mvc.Validation
{
	/// <summary>
	/// Contoller action validator.
	/// </summary>
	public interface IActionValidator
	{
		/// <summary>
		/// Performs action validation and fills model errors in case of validation failure.
		/// </summary>
		/// <param name="controller">
		/// Controller, which invoked action (not target controller!)
		/// </param>
		/// <param name="parameters">
		/// Action paramters
		/// </param>
		/// <param name="modelErrors">
		/// Validation errors collection.
		/// </param>
		void Validate(ValidateActionContext context);
	}
}